package com.zhny.aiot.four.solar.roll.film.v2.plugin.model;

import com.zhny.aiot.plugin.ActionValue;
import com.zhny.aiot.plugin.PropertyValue;
import com.zhny.aiot.plugin.model.*;
import lombok.Data;


@Data
public class SolarRollFilm4GV2StoreEntry extends StoreEntity {

    @PropertyValue(alias = "卷膜器",description = "卷膜器状态",unit = "",icon=IconConstract.Other,variableType=VariableType.Quilt,actions={
            @ActionValue(name=Operate.Value,commandCode="value",paramClass= AdjustableParam.class,eventType=EventType.Input),
            @ActionValue(name=Operate.Stop,commandCode="stop",eventType=EventType.Click),
            @ActionValue(name=Operate.Query,commandCode="query",eventType=EventType.Click)
    })
    private String status;

    @PropertyValue(alias = "电量",description = "电池电量",unit = "%",icon=IconConstract.Voltage,variableType=VariableType.Numerical,actions={
            @ActionValue(name=Operate.Check, commandCode="query", eventType=EventType.Click)
    })
    private String quantity;

    @PropertyValue(alias = "总脉冲数",description = "总脉冲数",icon=IconConstract.Other,variableType=VariableType.InputValue,actions={
            @ActionValue(name=Operate.Query, commandCode="queryPulse", eventType=EventType.Click),
            @ActionValue(name=Operate.Value, commandCode="valuePulse", paramClass= ValueParam.class,eventType=EventType.Input)
    })
    private String totalNumberOfPulses;

    @PropertyValue(alias = "版本号",description = "版本号",icon=IconConstract.Other,variableType=VariableType.Numerical,actions={
            @ActionValue(name=Operate.Check, commandCode="queryVersion", eventType=EventType.Click)
    })
    private String version;

    @PropertyValue(alias = "手动上报",description = "手动上报",icon=IconConstract.Other,variableType=VariableType.Other,actions={
    })
    private String manualReporting;
    @Override
    public String toString() {
        StringBuffer sb = new StringBuffer();
        sb.append("voltage=").append(this.quantity);
        sb.append(", rollFilmStatus=").append(this.status);
        sb.append(", totalNumberOfPulses=").append(this.totalNumberOfPulses);
        sb.append(", version=").append(this.version);
        sb.append(", description=").append(this.manualReporting);
        return sb.toString();
    }
}
